{#include file="admin_header.htm"#}
{#include file="admin_ad_nav.htm"#}
<script type="text/javascript" src="js/selectAll.js"></script>
<script type="text/javascript" src="js/is_show.js"></script>
<div class="admin_main_nr_box">
  <table width="700" border="0" cellspacing="8" cellpadding="0" class="link_lan">
    <tr>
      <td width="97" height="22" align="center" background="images/article_category_bg.jpg" style="background-repeat:no-repeat">按廣告類型</td>
      <td>
<div style=" float:left; width:70px; height:22px; line-height:22px; margin-right:5px; text-align:center;{#if $type_id eq ""#}background-color: #DFEDF7{#/if#}"><a href="?act=list&type_id=">不限</a></div>
{#section name=ad_type loop=$ad_type#}
<div style=" float:left; width:70px; height:22px; line-height:22px; margin-right:5px; text-align:center;{#if $type_id==$ad_type[ad_type].id#}background-color: #DFEDF7{#/if#}"><a href="?act=list&type_id={#$ad_type[ad_type].id#}">{#$ad_type[ad_type].categoryname#}</a></div>
{#/section#}
<div class="clear"></div></td>
    </tr>
  </table>
  <table width="700" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><table width="150" border="0" cellspacing="2" cellpadding="0">
          <form action="" method="post" name="form3" id="form3">
            <tr>
              <td width="41">每頁：</td>
              <td width="20"><input name="perpage" type="text" id="perpage"  style="width:30px; height:15px; color:#666666; border:1px #97ADCE solid; text-align:center"  onkeyup="if(event.keyCode !=37 && event.keyCode != 39) value=value.replace(/\D/g,'');" value="{#$perpage#}" maxlength="3"onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/\D/g,''))"/></td>
              <td width="81"><input  style="font-family:Arial; font-size:10px; height:22px;" type="submit" name="Submitok"  value="OK" /></td>
            </tr>
          </form>
      </table></td>
      <td width="61%">&nbsp;</td>
    </tr>
  </table>
  <form id="form1" name="form1" method="post" action="?act=del_ad">
  <table width="700" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
    <tr>
      <td width="25" height="26" align="center" bgcolor="#D0E2F7" >
      <input type="checkbox" name="chkAll" title="全選/反選" onClick="selectAll()"/>	  </td>
      <td width="50" align="center" bgcolor="#D0E2F7" >類型</td>
      <td width="120" align="center" bgcolor="#D0E2F7" >廣告標題</td>
      <td align="center"  bgcolor="#D0E2F7">鏈接地址</td>
      <td width="150" align="center"  bgcolor="#D0E2F7">所處位置</td>
      <td width="85" align="center"  bgcolor="#D0E2F7">添加時間</td>
      <td width="40" align="center" bgcolor="#D0E2F7"  >排序</td>
      <td width="50" align="center" bgcolor="#D0E2F7"  >操作</td>
    </tr>
  </table>
    <table width="700" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="link_lan">
      {#section name=list loop=$list#}
      <tr class="row">
      <td width="27" align="center" style="border-bottom:1px #CCCCCC solid; padding-left:2px;">
        <input name="y_id[]" type="checkbox" id="y_id" value="{#$list[list].id#}"  onclick="javascript:chkRow(this);"/>      </td>
        <td width="50" height="34" align="center" style="border-bottom:1px #CCCCCC solid">{#$list[list].type_name#}</td>
        <td width="120" style="border-bottom:1px #CCCCCC solid">
		<span  onmousemove="showpup('{#$list[list].title#}')" onmouseout="hidepup()" >{#$list[list].title_str#}</span>
		{#if $list[list].img<>""#} <img src="images/photo.gif" width="16" height="16" border="0" align="absmiddle"  onmousemove="showpup('<img src={#$upfiles_dir#}{#$list[list].img#}  border=0  align=absmiddle>')" onmouseout="hidepup()" />{#/if#}
		</td>
        <td style="border-bottom:1px #CCCCCC solid"><a href="{#$list[list].url#}" target="_blank" onmousemove="showpup('{#$list[list].url#}')" onmouseout="hidepup()" >{#$list[list].url_str#}</a></td>
        <td width="150" style="border-bottom:1px #CCCCCC solid" class="link_bk"><a href="?category_id={#$list[list].category_id#}">[{#$list[list].category_name#}]</a></td>
        <td width="85" align="center" style="border-bottom:1px #CCCCCC solid">{#$list[list].addtime|date_format:"%Y-%m-%d"#}</td>
        <td width="40" align="center" style="border-bottom:1px #CCCCCC solid">{#$list[list].show_order#}</td>
        <td width="50" align="center" style="border-bottom:1px #CCCCCC solid"><a href="?act=edit_ad&id={#$list[list].id#}">修改</a></td>
      </tr>
      {#sectionelse#}
  <tr>
    <td height="50" colspan="9" align="center">沒有任何記錄！</td>
  </tr>
      {#/section#}
    </table>
	{#if $list#}
	<table width="700" border="0" cellspacing="0" cellpadding="0" >
      <tr>
        <td height="50">
	
          <input type="button" name="Submit22" value="添加廣告" class="Qishi_submit_a" onmouseover="this.className='Qishi_submit_b'"  onmouseout="this.className='Qishi_submit_a'" onclick="window.location='?act=ad_add_select'"/> 	&nbsp;&nbsp;
		<input type="submit" name="delete" value="刪除" class="Qishi_submit_a" onmouseover="this.className='Qishi_submit_b'"  onmouseout="this.className='Qishi_submit_a'" />
		</td>
		
      </tr>
    </table>
	<span id="op1"></span>
	{#/if#}
  </form>
	    <table width="700" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><table border="0" align="center" cellpadding="0" cellspacing="0" class="link_page">
          <tr>
            <td height="40" align="center" >{#$page#}</td>
          </tr>
        </table></td>
      </tr>
    </table>
</div>
{#include file="admin_footer.htm"#}
</body>
</html>
